# coding=utf-8
"""
    @project: wlou
    
    @file： static_headers_middleware.py
    @date：2024/3/13 18:26
    @desc:
"""
from django.utils.deprecation import MiddlewareMixin
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from common.models.db_model_manage import DBModelManage

class SwaggerMiddleware(MiddlewareMixin):
    def process_response(self, request, response):
        is_xpack = hasattr(settings, 'IS_XPACK')
        
        
        if is_xpack:
            response.content = _("The license has not been uploaded or the license has expired")
        return response
